<div class="main-blocks">
    <div class="heading-main-blocks">
        <h4>Kết quả tìm kiếm</h4>
    </div>
    
    <div class="content-main-blocks">
    <?php
        if(count($this->data) > 0) :
        $common = new Admincp_Model_Common();
        foreach($this->data as $value) :
    ?>
        <div class="product">
            <div class="product-title">
                <a href="<?php echo $this->url(array('action'=>'detail','controller'=>'product','module'=>'default','title'=>$value['url'],'id'=>$value['id']),'product'); ?>">
                    <?php echo $value['name']; ?>
                </a>
            </div>
            
            <a class="product-image" href="<?php echo $this->url(array('action'=>'detail','controller'=>'product','module'=>'default','title'=>$value['url'],'id'=>$value['id']),'product'); ?>">
                <img src="<?php echo $this->baseUrl('/public/files/product/thumbnail/').$value['thumbnail']; ?>" onmouseover="Tip('<table border=0 cellpadding=0 cellspacing=0 width=100%><tr><td align=center><strong><?php echo $value['name']; ?></strong></td></tr><tr><td align=left><img src=<?php echo $this->baseUrl('/public/files/product/').$value['image']; ?> width=400 /></td></tr></table>', WIDTH, 400, ABOVE, true, OFFSETX, 1, FADEIN, 400, FADEOUT, 300)" onmouseout="UnTip()"/>
            </a>
            
            <div class="price">
                <p class="product-weight"><?php echo ($value['size'] != '') ? $value['size'] : '&nbsp;'; ?></p>
                <p class="product-original-price">Chưa VAT: <?php echo $common->formatMoney($value['price']); ?> VNĐ</p>
                <p class="product-sales-price"><span class="error-msg">Có VAT 10%: <?php echo $common->formatMoney($value['price_vat']); ?> VNĐ</span></p>
            </div>
            
            <div class="add-cart">
                <a href="<?php echo $this->url(array('action'=>'index','controller'=>'cart','module'=>'default'),'cart').'?id='.$value['id']; ?>">Mua hàng</a>
            </div>
        </div>
        <!-- End .product -->
    <?php endforeach; ?>
    <?php else : ?>
    <p>Không tìm thấy sản phẩm nào theo yêu cầu</p>
    <?php endif; ?>
    
    <?php if(count($this->data) > 0) : ?>
    <div class="pagination">
        <?php
	        $currentUrl = '&name='.$this->keyword['name'].'&start_price='.$this->keyword['start_price'].'&end_price='.$this->keyword['end_price'].'&category='.$this->keyword['category'].'&provider='.$this->keyword['provider'].'&submit=Tìm+kiếm';
	        echo $this->paginationControl($this->data, 'Sliding', 'product/pagination_search.phtml', array('currentUrl' => $currentUrl));
        ?>
    </div>
    <?php endif; ?>
    </div>
</div>
<!-- End .main-blocks -->